<!-- UeditorWrap -->
<template>
  <VueUeditorWrap class="ueditor-wrap" :config="myConfig" v-model="msg"></VueUeditorWrap>
</template>

<script>
import VueUeditorWrap from 'vue-ueditor-wrap'
export default {
  name: 'VueUeditor',
  props: {
    value: {
      type: String,
      default: ''
    },
    label: {
      type: String,
      default: '内容'
    },
    height: {
      type: String,
      default: '300px'
    }
  },
  components: { VueUeditorWrap },
  data: function () {
    return {
      editor: 'VueUeditorWrap',
      msg: this.value || '',
      myConfig: {
        zIndex: 1,
        autoHeightEnabled: false,
        // 初始容器高度
        initialFrameHeight: 300,
        // 字号
        fontsize: [10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 50, 60],
        // 初始容器宽度
        initialFrameWidth: '100%',
        serverUrl: 'https://api.xsysq.cn/php/controller.php'
        // serverUrl: 'http://35.201.165.105:8000/controller.php'
      }
    }
  },
  created: function () {
  },
  watch: {
    msg: function(newValue, oldValue) {
      // console.log(newValue)
      this.$emit('input', newValue)
    }
  },
  computed: {},
  methods: {}
}
</script>
